This repository was archived by the owner on Dec 17, 2023. It is now read-only.
chore(deps): update dependency astro to v4 #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^2.0.0->^4.0.0Release Notes
withastro/astro (astro)
v4.0.3Compare Source
Patch Changes
#9342
eb942942dThanks @Princesseuh! - Fix missingis:inlinetype for the<slot />element#9343
ab0281aeeThanks @martrapp! - Adds source file properties to HTML elements only if devToolbar is enabled#9336
c76901065Thanks @FredKSchott! - dev: fix issue where 404 and 500 responses were logged as 200#9339
0bb3d5322Thanks @morinokami! - Fixed the log message to correctly display 'enabled' and 'disabled' when toggling 'Disable notifications' in the Toolbar.v4.0.2Compare Source
Patch Changes
#9331
cfb20550dThanks @natemoo-re! - Updates an internal dependency (vitefu) to avoid a commonpeerDependencywarning#9327
3878a91beThanks @doseofted! - Fixes an edge case for<form method="dialog">when using View Transitions. Forms withmethod="dialog"no longer require an additionaldata-astro-reloadattribute.v4.0.1Compare Source
Patch Changes
631e5d01bThanks @ematipico! - Fixes an issue where logs that weren't grouped together by route when building the app.v4.0.0Compare Source
Major Changes
#9138
abf601233Thanks @bluwy! - Updates the unified, remark, and rehype dependencies to latest. Make sure to update your custom remark and rehype plugins as well to be compatible with the latest versions.Potentially breaking change: The default value of
markdown.remarkRehype.footnoteBackLabelis changed from"Back to content"to"Back to reference 1". See themdast-util-to-hastcommit for more information.#9181
cdabf6ef0Thanks @bluwy! - Removes support for returning simple objects from endpoints (deprecated since Astro 3.0). You should return aResponseinstead.ResponseWithEncodingis also removed. You can refactor the code to return a response with an array buffer instead, which is encoding agnostic.The types for middlewares have also been revised. To type a middleware function, you should now use
MiddlewareHandlerinstead ofMiddlewareResponseHandler. If you useddefineMiddleware()to type the function, no changes are needed.#9263
3cbd8ea75Thanks @bluwy! - Removes additional deprecated APIs:astro/client-imagetype. You should use theastro/clienttype instead.rsssupport ingetStaticPaths. You should use@astrojs/rssinstead.Astro.request.paramssupport. You should useAstro.paramsinstead.#9271
47604bd5bThanks @matthewp! - Renames Dev Overlay to Dev ToolbarThe previously named experimental Dev Overlay is now known as the Astro Dev Toolbar. Overlay plugins have been renamed as Toolbar Apps. All APIs have been updated to reflect this name change.
To not break existing APIs, aliases for the Toolbar-based names have been created. The previous API names will continue to function but will be deprecated in the future. All documentation has been updated to reflect Toolbar-based names.
#9122
1c48ed286Thanks @bluwy! - Adds Vite 5 support. There are no breaking changes from Astro. Check the Vite migration guide for details of the breaking changes from Vite instead.#9225
c421a3d17Thanks @natemoo-re! - Removes the opt-inhandleFormsproperty for<ViewTransitions />. Form submissions are now handled by default and this property is no longer necessary. This default behavior can be disabled by settingdata-astro-reloadon relevant<form />elements.#9196
37697a2c5Thanks @bluwy! - Removes support for Shiki custom language'spathproperty. The language JSON file should be imported and passed to the option instead.#9199
49aa215a0Thanks @lilnasy! - This change only affects maintainers of third-party adapters. In the Integration API, theapp.render()method of theAppclass has been simplified.Instead of two optional arguments, it now takes a single optional argument that is an object with two optional properties:
routeDataandlocals.The current signature is deprecated but will continue to function until next major version.
#9212
c0383ea0cThanks @alexanderniebuhr! - Removes deprecatedapp.match()option,matchNotFound#9168
153a5abb9Thanks @bluwy! - Removes deprecated features from Astro 3.0supportedAstroFeaturesto specify a list of features they support.build.splitandbuild.excludeMiddlewareoptions are removed. UsefunctionPerRouteandedgeMiddlewarefrom adapters instead.markdown.draftsoption and draft feature is removed. Use content collections instead.getHeaders()exported from markdown files is removed. UsegetHeadings()instead.Minor Changes
#9105
6201bbe96Thanks @FredKSchott! - Update CLI logging experience#9200
b4b851f5aThanks @ematipico! - Adds a new way to configure thei18n.localesarray.Developers can now assign a custom URL path prefix that can span multiple language codes:
With the above configuration, the URL prefix of the default locale will be
/english/. When computingAstro.preferredLocale, Astro will use thecodes.#9115
3b77889b4Thanks @natemoo-re! - Adds theastro preferencescommand to manage user preferences. User preferences are specific to individual Astro users, unlike theastro.config.mjsfile which changes behavior for everyone working on a project.User preferences are scoped to the current project by default, stored in a local
.astro/settings.jsonfile. Using the--globalflag, user preferences can also be applied to every Astro project on the current machine. Global user preferences are stored in an operating system-specific location.v3.6.4Compare Source
Patch Changes
#9226
8f8a40e93Thanks @outofambit! - Fix i18n fallback routing with routing strategy of always-prefix#9179
3f28336d9Thanks @lilnasy! - Fixes an issue where the presence of a slot in a page led to an error.#9219
067a65f5bThanks @natemoo-re! - Fix edge case where<style>updates inside of.astrofiles would ocassionally fail to update without reloading the page.#9236
27d3e86e4Thanks @ematipico! - The configurationi18n.routingStrategyhas been replaced with an object calledrouting.export default defineConfig({ experimental: { i18n: { - routingStrategy: "prefix-always", + routing: { + prefixDefaultLocale: true, + } } } })export default defineConfig({ experimental: { i18n: { - routingStrategy: "prefix-other-locales", + routing: { + prefixDefaultLocale: false, + } } } })v3.6.3Compare Source
Patch Changes
0dc99c9a2Thanks @florian-lefebvre! - Prevents the Code component from crashing if the lang isn't supported by falling back toplaintext.v3.6.2Compare Source
Patch Changes
d90714fc3Thanks @SpencerWhitehead7! - Fixes an issue where links with the same pathname as the current page, but different search params, were not prefetched.v3.6.1Compare Source
Patch Changes
#9173
04fdc1c61Thanks @lilnasy! - Fixes an issue where having a middleware prevented the SSR app from being deployed on Netlify.#9186
607542c7cThanks @martrapp! - Fixes a view transition issue on webKit browsers that prevented scrolling to #fragmentsv3.6.0Compare Source
Minor Changes
#9090
c87223c21Thanks @martrapp! - Take full control over the behavior of view transitions!Three new events now complement the existing
astro:after-swapandastro:page-loadevents:The
astro:before-*events allow you to change properties and strategies of the view transition implementation.The
astro:after-*events are notifications that a phase is complete.Head over to docs to see the full view transitions lifecycle including these new events!
#9092
0ea4bd47eThanks @smitbarmase! - Changes the fallback prefetch behavior on slow connections and when data saver mode is enabled. Instead of disabling prefetch entirely, thetapstrategy will be used.#9166
cba6cf32dThanks @matthewp! - The Picture component is no longer experimentalThe
<Picture />component, part ofastro:assets, has exited experimental status and is now recommended for use. There are no code changes to the component, and no upgrade to your project is necessary.This is only a change in documentation/recommendation. If you were waiting to use the
<Picture />component until it had exited the experimental stage, wait no more!#9092
0ea4bd47eThanks @smitbarmase! - Adds aignoreSlowConnectionoption to theprefetch()API to prefetch even on data saver mode or slow connection.v3.5.7Compare Source
Patch Changes
7ff8d62bfThanks @ematipico! - Revert fix around fallback system, which broken injected stylesv3.5.6Compare Source
Patch Changes
#9121
f4efd1c80Thanks @peng! - Adds a warning ifastro addfetches a package but returns a non-404 status#9142
7d55cf68dThanks @ematipico! - Consistely emit fallback routes in the correct folders.#9119
306781795Thanks @ematipico! - Fix a flaw in the i18n fallback logic, where the routes didn't preserve their metadata, such as hoisted scripts#9140
7742fd7dcThanks @martrapp! - View Transitions: handle clicks on SVGAElements and image maps"#9101
e3dce215aThanks @ematipico! - Add a new propertyAstro.currentLocale, available wheni18nis enabled.v3.5.5Compare Source
Patch Changes
#9091
536c6c9fdThanks @ematipico! - TheroutingStrategyprefix-alwaysshould not force its logic to endpoints. This fixes some regression withastro:assetsand@astrojs/rss.#9102
60e8210b0Thanks @Princesseuh! - In the dev overlay, when there's too many plugins enabled at once, some of the plugins will now be hidden in a separate sub menu to avoid the bar becoming too longv3.5.4Compare Source
Patch Changes
#9085
fc66ecff1Thanks @ematipico! - When redirecting to the default root locale, Astro middleare should take into consideration the value oftrailingSlash#9067
c6e449c5bThanks @danielhajduk! - Fixes display of debug messages when using the--verboseflag#9075
c5dc8f2ecThanks @Princesseuh! - Fix Passthrough image service generating multiple images with the same content in certain cases#9083
4537ecf0dThanks @bluwy! - Uses newcreateShikiHighlighterAPI from@astrojs/markdown-remarkto avoid code duplication#9084
045e5ec97Thanks @matthewp! - Supportsformmethodandformactionfor form overrides#9087
b895113a0Thanks @alexanderniebuhr! - Fixes the regression which broke bundling of image service for pre-rendered pages, which was introduced by #8854#9058
5ef89ef33Thanks @Princesseuh! - Add a new settings panel to the dev overlay#9045
84312f24fThanks @rishi-raj-jain! - Fixes preview servertrailingSlashhandling for request URLs with query stringsUpdated dependencies [
4537ecf0d]:v3.5.3Compare Source
Patch Changes
50164f5e3Thanks @natemoo-re! - Fix a regression introduced in 3.5.0 related to content collection stylesv3.5.2Compare Source
Patch Changes
1bc331968Thanks @ematipico! - Correctly infer the presence of an user middlewarev3.5.1Compare Source
Patch Changes
#9037
ea71975ecThanks @sarah11918! - Updates i18n configuration reference#9051
15b84ccb9Thanks @ematipico! - Fix a regression where endpoints were incorrectly processed during SSG build whentrailingSlash: "always"#9042
7dedd17fcThanks @rishi-raj-jain! - Safely bail when thexclipcommand does not exist on Linux when trying to copy to clipboard withastro info#9050
bf0286e50Thanks @Princesseuh! - Fix --verbose flag not working#9049
49b82edb2Thanks @Princesseuh! - Fix image errors when images were used on the clientv3.5.0Compare Source
Minor Changes
#8869
f5bdfa272Thanks @matthewp! - ## Integration Hooks to add MiddlewareIt's now possible in Astro for an integration to add middleware on behalf of the user. Previously when a third party wanted to provide middleware, the user would need to create a
src/middleware.tsfile themselves. Now, adding third-party middleware is as easy as adding a new integration.For integration authors, there is a new
addMiddlewarefunction in theastro:config:setuphook. This function allows you to specify a middleware module and the order in which it should be applied:You can now add your integration's middleware and specify that it runs either before or after the application's own defined middleware (defined in
src/middleware.{js,ts})#8854
3e1239e42Thanks @natemoo-re! - Provides a new, experimental build cache for Content Collections as part of the Incremental Build RFC. This includes multiple refactors to Astro's build process to optimize how Content Collections are handled, which should provide significant performance improvements for users with many collections.Users building a
staticsite can opt-in to preview the new build cache by adding the following flag to your Astro config:When this experimental feature is enabled, the files generated from your content collections will be stored in the
cacheDir(by default,node_modules/.astro) and reused between builds. Most CI environments automatically restore files innode_modules/by default.In our internal testing on the real world Astro Docs project, this feature reduces the bundling step of
astro buildfrom 133.20s to 10.46s, about 92% faster. The end-to-endastro buildprocess used to take 4min 58s and now takes just over1minfor a total reduction of 80%.If you run into any issues with this experimental feature, please let us know!
You can always bypass the cache for a single build by passing the
--forceflag toastro build.#8963
fda3a0213Thanks @matthewp! - Form support in View Transitions routerThe
<ViewTransitions />router can now handle form submissions, allowing the same animated transitions and stateful UI retention on form posts that are already available on<a>links. With this addition, your Astro project can have animations in all of these scenarios:navigate()API.This feature is opt-in for semver reasons and can be enabled by adding the
handleFormsprop to the ` component:v3.4.4Compare Source
Patch Changes
#9000
35739d01eThanks @martrapp! - Fixes an error in dev mode on Safari where view transitions prevented navigating to pages withclient:onlycomponents#9014
d979b8f0aThanks @Princesseuh! - Add animations, shadows and general styling tweaks to the Dev Overlay to better match the intended design.#8996
3988bbcc9Thanks @bluwy! - Adds compatibility for shiki languages with thepathproperty#8986
910eb00feThanks @Princesseuh! - Fixsizesattribute not being present onsourceelements when using it on the Picture componentv3.4.3Compare Source
Patch Changes
#8981
ab7e745ccThanks @matthewp! - Increase the scroll restoration throttle time#8940
937522fb7Thanks @MarvinXu! - Omit nullish and falsy (non-zero) values when stringifying object-formstyleattributes in Astro filesv3.4.2Compare Source
Patch Changes
#8977
40a061679Thanks @matthewp! - Prevent route announcer from being visible#8929
2da33b7a1Thanks @lilnasy! - Fixes an issue where rendering the same slot multiple times invoked it only once.#8978
cc3278bb6Thanks @Princesseuh! - In the dev overlay, add a tooltip showing the currently hovered / focused plugin's namev3.4.1Compare Source
Patch Changes
#8966
262cef248Thanks @Princesseuh! - Fix Dev Overlay not working properly when view transitions are enabled#8932
5fed432b0Thanks @Princesseuh! - Fixed window component appearing over the dev overlay on small windows. Added a maximum length to sections of the tooltip component#8965
430c470acThanks @matthewp! - Move VT route announcer styles to a classDoing so allows stricter CSP policies.
#8762
35cd810f0Thanks @evadecker! - Upgrades Zod to 3.22.4#8928
ca90b47cfThanks @HiDeoo! - Renames dev overlay UI Toolkit component names for consistency.v3.4.0Compare Source
Minor Changes
#8755
fe4079f05Thanks @matthewp! - Page PartialsA page component can now be identified as a partial page, which will render its HTML content without including a
<! DOCTYPE html>declaration nor any<head>content.A rendering library, like htmx or Stimulus or even just jQuery can access partial content on the client to dynamically update only parts of a page.
Pages marked as partials do not have a
doctypeor any head content included in the rendered result. You can mark any page as a partial by setting this option:v3.3.4Compare Source
Patch Changes
#8877
26b77b8feThanks @bluwy! - Fixes CSS modules ordering by rendering styles before linksUpdated dependencies [
341ef6578]:v3.3.3Compare Source
Patch Changes
#8870
5ea6ee0edThanks @xstevenyung! - prevent production install on astro add cmd#8840
5c888c10bThanks @martrapp! - Fixes styles ofclient:onlycomponents not persisting during view transitions in dev mode#8814
ad2bb9155Thanks @lilnasy! - Fix an issue where500.astrodid not render when the middleware threw an error.#8863
326e17893Thanks @florian-lefebvre! - Fixes an issue where the dev server logged the full file path on updates.v3.3.2Compare Source
Patch Changes
#8852
2c18e2d12Thanks @rayriffy! - Only use Vite config from astro.config.mjs as source of truth#8828
11f45b9a3Thanks @rishi-raj-jain! - fix file system path references#8779
2b8a459a6Thanks @ematipico! - Enriches the explanation of thebaseconfiguration with examples.v3.3.1Compare Source
Patch Changes
#8823
8946f2a25Thanks @Princesseuh! - Fix duplicate images being created in some cases when using densities and/or widths#8842
b405b039aThanks @Princesseuh! - Fixes Picture component not taking into account the fallback format specified#8827
ce3025cfaThanks @rishi-raj-jain! - better error handling there whenever we don't get a normal 200 response#8817
f8de1983bThanks @bluwy! - Fix error overlay syntax highlighting#8838
2f9e2083dThanks @dominikg! - deps: unpin and update tsconfck from3.0.0-next.9to^3.0.0#8823
8946f2a25Thanks @Princesseuh! - fix remote srcset images not being resizedv3.3.0Compare Source
Minor Changes
#8808
2993055beThanks @delucis! - Adds support for an--outDirCLI flag toastro build#8502
c4270e476Thanks @bluwy! - Updates the internalshikisyntax highlighter toshikiji, an ESM-focused alternative that simplifies bundling and maintenance.There are no new options and no changes to how you author code blocks and syntax highlighting.
Potentially breaking change: While this refactor should be transparent for most projects, the transition to
shikijinow produces a smaller HTML markup by attaching a fallbackcolorstyle to thepreorcodeelement, instead of to the linespandirectly. For example:Before:
After:
This does not affect the colors as the
spanwill inherit thecolorfrom the parent, but if you're relying on a specific HTML markup, please check your site carefully after upgrading to verify the styles.#8798
f369fa250Thanks @Princesseuh! - Fixedtsconfig.json's new array format forextendsnot working. This was done by migrating Astro to usetsconfckinstead oftsconfig-resolverto find and parsetsconfig.jsonfiles.#8620
b2ae9ee0cThanks @Princesseuh! - Adds experimental support for generatingsrcsetattributes and a new<Picture />component.v3.2.4Compare Source
Patch Changes
#8638
160d1cd75Thanks @florian-lefebvre! - The@astrojs/tailwindintegration now creates atailwind.config.mjsfile by default#8767
30de32436Thanks @martrapp! - Revert fix #8472#8472 caused some style files from previous pages to not be cleanly deleted on view transitions. For a discussion of a future fix for the original issue #8144 see #8745.
#8741
c4a7ec425Thanks @lilnasy! - Fixed an issue on Windows where lowercase drive letters in current working directory led to missing scripts and styles.#8772
c24f70d91Thanks @martrapp! - Fix flickering during view transitions#8754
93b092266Thanks @bluwy! - Make CSS chunk names less confusing#8776
29cdfa024Thanks @martrapp! - Fix transition attributes on islands#8773
eaed844eaThanks @sumimakito! - Fix an issue where HTML attributes do not render if getHTMLAttributes in an image service returns a Promisev3.2.3Compare Source
Patch Changes
#8737
6f60da805Thanks @ematipico! - Add provenance statement when publishing the library from CI#8747
d78806dfeThanks @natemoo-re! - Improve error message when user attempts to render a dynamic component reference#8736
d1c75fe15Thanks @bluwy! - Fixtsconfig.jsonupdate causing the server to crash#8743
aa265d730Thanks @bluwy! - Remove unused CSS output files when inlined#8700
78adbc443Thanks @jacobthesheep! - Update link for Netlify SSR#8729
21e0757eaThanks @lilnasy! - Node-based adapters now create less server-side javascript#8730
357270f2aThanks @natemoo-re! - Improveastro infocopy to clipboard compatabilityUpdated dependencies [
21f482657,6f60da805,21e0757ea]:v3.2.2Compare Source
Patch Changes
#8724
455af3235Thanks @bluwy! - Fix CSS styles on Windows#8710
4c2bec681Thanks @matthewp! - Fixes View transition styles being missing when component used multiple timesv3.2.1Compare Source
Patch Changes
#8680
31c59ad8bThanks @bluwy! - Fix hydration on slow connection#8698
47ea310f0Thanks @Princesseuh! - Use a Node-specific image endpoint to resolve images in dev and Node SSR. This should fix many issues related to getting 404 from the _image endpoint under certain configurations#8706
345808170Thanks @bluwy! - Fix duplicated Astro and Vite injected stylesv3.2.0Compare Source
Minor Changes
#8696
2167ffd72Thanks @matthewp! - Support adding integrations dynamicallyAstro integrations can now themselves dynamically add and configure additional integrations during set-up. This makes it possible for integration authors to bundle integrations more intelligently for their users.
In the following example, a custom integration checks whether
@astrojs/sitemapis already configured. If not, the integration adds Astro’s sitemap integration, passing any desired configuration options:#8696
2167ffd72Thanks @matthewp! - View transitions can now be triggered from JavaScript!Import the client-side router from "astro:transitions/client" and enjoy your new remote control for navigation:
#8696
2167ffd72Thanks @matthewp! - Route Announcer in<ViewTransitions />The View Transitions router now does route announcement. When transitioning between pages with a traditional MPA approach, assistive technologies will announce the page title when the page finishes loading. This does not automatically happen during client-side routing, so visitors relying on these technologies to announce routes are not aware when a page has changed.
The view transitions route announcer runs after the
astro:page-loadevent, looking for the page<title>to announce. If one cannot be found, the announcer falls back to the first<h1>it finds, or otherwise announces the pathname. We recommend you always include a<title>in each page for accessibility.See the View Transitions docs for more on how accessibility is handled.
Patch Changes
#8647
408b50c5eThanks @lilnasy! - Fixed an issue where configured redirects with dynamic routes did not work in dev mode.#8696
2167ffd72Thanks @matthewp! - Fix logLevel passed to Vite build#8696
2167ffd72Thanks @matthewp! - Fix NoImageMetadata image path error message#8670
e797b6816Thanks @MichailiK! - Fix asset optimization failing when outDir is outside the project directory#8684
824dd4670Thanks [@matthewp](https://togithub.com/mConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.